﻿using System;
using System.Windows.Forms;

namespace UseItems
{
    public partial class FormSettings : Form
    {
        public FormSettings()
        {
            InitializeComponent();
        }

        private void FormSettings_Load(object sender, EventArgs e)
        {
            pgSettings.SelectedObject = UseItemSettings.Instance;
        }

        private void pgSettings_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            var useItemSettings = pgSettings.SelectedObject as UseItemSettings;
            if (useItemSettings != null)
                useItemSettings.Save();
        }
    }
}
